
package com.ywjg.serviceimp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.ywjg.dao.CheckMakeDao;
import com.ywjg.model.CheckMake;
import com.ywjg.service.ICheckMakeService;
import com.ywjg.utils.Utils;
@Service
public class CheckMakeService implements ICheckMakeService {
    @Resource
	CheckMakeDao checkMakeDao;

	/* (non-Javadoc)
	 * @see com.ywjg.serviceimp.ICheckMakeService#getOwnCheckMakeInf(java.lang.Integer)
	 */
	public CheckMake getOwnCheckMakeInf(Integer user_id) {
		// TODO Auto-generated method stub
		return checkMakeDao.findByappUserId(user_id);
	}
	
	
	
	
	
	
	/* (non-Javadoc)
	 * @see com.ywjg.serviceimp.ICheckMakeService#addCheckMakeInf(com.ywjg.model.CheckMake)
	 */
	public CheckMake addCheckMakeInf(CheckMake checkMake) {
		// TODO Auto-generated method stub
		return checkMakeDao.save(checkMake);
	}

	/* (non-Javadoc)
	 * @see com.ywjg.serviceimp.ICheckMakeService#upDataMakeInf(com.ywjg.model.CheckMake)
	 */
	public CheckMake upDataMakeInf(CheckMake c) {
		CheckMake findOne = checkMakeDao.findOne(c.getId());
		Utils.copyPropertiesIgnoreNull(c, findOne);
		return checkMakeDao.save(findOne);
	}
	
	
	/* (non-Javadoc)
	 * @see com.ywjg.serviceimp.ICheckMakeService#findAllMakeInf()
	 */
	public List<CheckMake> findAllMakeInf() {
		List<CheckMake> findAll = checkMakeDao.findAll();
		return findAll;
	}

	
}
